document

abstract fun document(): Optional<Document>

Returns an Optional that contains the DOM Document instance of the frame or an empty Optional if the frame does not have a document.

Note: Chromium injects a document into the frame asynchronously, so there is a chance that this method might return an empty Optional even if the frame is already available.

Throws

when the frame is closed